<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>轮播图前要写法</title>
    <style>
        *{margin: 0;padding: 0;list-style-type: none;}
    </style>
</head>
<body>
    <div id="box"></div>
    <script>
        let eleBox = document.querySelector("#box");
        //改写法获取的元素id若有多个，只获取第一个
        //若想获取批量元素，采取下面的写法
        // document.querySelectorAll()
        eleBox.style.backgroundImage = "url('')"

        //给元素添加/删除类名  remove删除
        eleBox.classList.add("wrap");
    </script>
</body>
</html>